﻿<%@ Page Language="VB" AutoEventWireup="false" MasterPageFile="~/NavegacaoMaster.master" CodeFile="forum_inicial.aspx.vb" Inherits="forum_forum_inicial" %>

<asp:Content ID="Content1" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">
    <div>    
        <table style="width:100%;">
            <tr>
                <td class="style3" style="width: 15px">
                    &nbsp;</td>
                <td>
                    <p class="titulo-pagina">Fórum</p></td>
            </tr>
            <tr>
                <td class="style3" style="width: 15px">
                    &nbsp;</td>
                <td>
                    <table>
                        <tr>
                            <td style="width: 332px">
                                &nbsp;</td>
                            <td style="width: 231px">
                <asp:TextBox ID="txtBusca" runat="server" Width="100px"></asp:TextBox>
                <asp:Button ID="btnPesquisar" runat="server" onclick="btnPesquisar_Click" 
                    SkinID="btnPadrao" Text="Buscar" Width="61px" />
                <asp:LinkButton ID="LinkButton1" runat="server" SkinID="lnkGridView" 
                    onclick="LinkButton1_Click">Avançada</asp:LinkButton>
                            </td>
                        </tr>
                    </table>
                                  </td>
            </tr>
            <tr>
                <td class="style3" style="width: 15px">
                    &nbsp;</td>
                <td>
                    <a class="forum-subtitulo">Categorias                 <a class="forum-subtitulo">Categorias<br /></a>
                    <a class="forum-voltar"><asp:LinkButton ID="lnkBtnAddCategoria1" runat="server" 
                        PostBackUrl="adm_nova_categoria.aspx" CssClass="forum-voltar" 
                            EnableTheming="True">+ Adicionar Categoria</asp:LinkButton></a>
                </td>
            </tr>
            <tr>
                <td class="style3" style="width: 15px">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="border: 0px none #FFFFFF; padding: 0px; width: 15px;" class="style3">
                    &nbsp;</td>
                <td style="border: 0px none #FFFFFF; padding: 0px">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        DataKeyNames="Id" Width="580px" ShowHeader="False" BorderWidth="0px">
                        <Columns>
                            <asp:BoundField DataField="Id" Visible="False" />
                            <asp:TemplateField>
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Nome") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    
                                    <table style="border-width: 0px; padding: 0px; margin: 0px; width:100%; border-spacing: 0px;">
                                        <tr>
                                            <td class="forum-celulaCategoria" 
                                                style="border-style: none; border-width: 0px; width: 5px">
                                            </td>
                                            <td style="padding: 0px; margin: 0px; border-style: solid; border-width: 0px; background-color: #DD4814; text-align: left; vertical-align: top; width: 285px;">
                                                <asp:Label ID="Label1" runat="server" Font-Bold="True" ForeColor="White" 
                                                    Text='<%# Eval("Nome") %>'></asp:Label>
                                                <asp:Label ID="lblVisibilidade" runat="server" ForeColor="White" 
                                                    Text='<%# Eval("StrVisibilidade") %>'></asp:Label>
                                            </td>
                                            <td style="background-color: #DD4814">
                                                <table style="width:100%;">
                                                    <tr>
                                                        <td class="forum-link-header">
                                                            <a  href='adm_editar_categoria.aspx?id=<%#Eval ("Id")%>'>Editar</a></td>
                                                        <td class="forum-link-header">
                                                            <a href='excluir.aspx?id=<%#Eval ("Id")%>&amp;tipo=categoria'>Excluir</a></td>
                                                        <td class="forum-link-header">
                                                            <a href='adm_nova_subcategoria.aspx?id=<%#Eval ("Id")%>'>+ Adicionar 
                                                            Subcategoria</a></td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                    <table style="width:128%;">
                                        <tr>
                                            <td class="style1">
                                                <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                                                    Width="594px" CellPadding="0">
                                                    <RowStyle CssClass="forum-celula" />
                                                    <Columns>
                                                        <asp:HyperLinkField DataNavigateUrlFields="Id" 
                                                            DataNavigateUrlFormatString="subcategoria.aspx?id={0}" DataTextField="Nome" 
                                                            HeaderText="Subcategoria" >
                                                            <ControlStyle Width="90%" />
                                                            <HeaderStyle HorizontalAlign="Left" />
                                                            <ItemStyle Width="270px" />
                                                        </asp:HyperLinkField>
                                                        <asp:BoundField DataField="TotTopicos" HeaderText="Tópicos" >
                                                            <ControlStyle Width="5%" />
                                                            <HeaderStyle HorizontalAlign="Center" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="TotPosts" HeaderText="Posts" >
                                                            <ControlStyle Width="5%" />
                                                            <HeaderStyle HorizontalAlign="Center" />
                                                        </asp:BoundField>
                                                        <asp:TemplateField HeaderText="Visibilidade">
                                                            <ItemTemplate>
                                                                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="" 
                                                                    Text='<%# Eval("StrVisibilidade") %>'></asp:HyperLink>
                                                            </ItemTemplate>
                                                            <ControlStyle Width="5%" />
                                                            <HeaderStyle HorizontalAlign="Center" />
                                                        </asp:TemplateField>
                                                        <asp:HyperLinkField DataNavigateUrlFields="Id" 
                                                            DataNavigateUrlFormatString="adm_editar_subcategoria.aspx?id={0}" 
                                                            Text="Editar" >
                                                            <ControlStyle Width="5%" />
                                                        </asp:HyperLinkField>
                                                        <asp:HyperLinkField DataNavigateUrlFields="Id" 
                                                            DataNavigateUrlFormatString="excluir.aspx?tipo=subcategoria&amp;id={0}" 
                                                            Text="Excluir" >
                                                            <ControlStyle Width="5%" />
                                                        </asp:HyperLinkField>
                                                    </Columns>
                                                    <EmptyDataTemplate>
                                                    </EmptyDataTemplate>
                                                    <HeaderStyle CssClass="forum-celulaCinza" />
                                                </asp:GridView>
                                            </td>
                                        </tr>
                                    </table>
                                </ItemTemplate>
                            </asp:TemplateField>
                            
                        </Columns>
                        <EmptyDataTemplate>
                           
                        </EmptyDataTemplate>
                    </asp:GridView>
                    <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
                        DataKeyNames="Id" Width="580px" ShowHeader="False" BorderWidth="0px">
                        <Columns>
                            <asp:BoundField DataField="Id" Visible="False" />
                            <asp:TemplateField>
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Nome") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <table style="width:100%;">
                                        <tr>
                                                <td class="forum-celulaCategoria" 
                                                style="border-style: none; border-width: 0px; width: 5px">
                                            </td>
                                            <td style="background-color: #DD4814; text-align: left; vertical-align: top">
                                                <asp:Label ID="Label2" runat="server" Font-Bold="True" ForeColor="White" 
                                                    Text='<%# Eval("Nome") %>'></asp:Label>
                                                <asp:Label ID="lblVisibilidade0" runat="server" ForeColor="White" 
                                                    Text='<%# Eval("StrVisibilidade") %>'></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                    <table style="width:100%;">
                                        <tr>
                                            <td class="style1">
                                                <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" 
                                                    Width="594px">
                                                    <RowStyle CssClass="forum-celula" />
                                                    <Columns>
                                                        <asp:HyperLinkField DataNavigateUrlFields="Id" 
                                                            DataNavigateUrlFormatString="subcategoria.aspx?id={0}" DataTextField="Nome" 
                                                            HeaderText="Subcategoria" >
                                                            <HeaderStyle HorizontalAlign="Left" />
                                                            <ItemStyle Width="500px" />
                                                        </asp:HyperLinkField>
                                                        <asp:BoundField DataField="TotTopicos" HeaderText="Tópicos" />
                                                        <asp:BoundField DataField="TotPosts" HeaderText="Posts" />
                                                    </Columns>
                                                    <EmptyDataTemplate>
                                                    </EmptyDataTemplate>
                                                    <HeaderStyle CssClass="forum-celulaCinza" />
                                                </asp:GridView>
                                            </td>
                                        </tr>
                                    </table>
                                </ItemTemplate>
                            </asp:TemplateField>
                            
                        </Columns>
                        <EmptyDataTemplate>
                           
                        </EmptyDataTemplate>
                    </asp:GridView>
                </td>
            </tr>
            </table>    
    </div>
</asp:Content>
